/**
 * Author: wangxiaoying
 * Email: 1009929414@qq.com
 * Description:数据处理
 */

const FormatData = {

  //清空对象里面的空元素
  clearObjEmptyPrama(obj) {
    if (!(typeof obj == 'object')) {
      return
    }
    for (let key in obj) {
      if (obj.hasOwnProperty(key)
        && (obj[key] !== 0) &&(obj[key] == null || obj[key] == undefined || obj[key] == '' || obj[key] == [])) {
        delete obj[key];
      }
    }
    return obj
  }
}


export default FormatData


